POV-Ray : Newsgroups : povray.newusers : hemisphere : Re: hemisphere Server Time
30 Jul 2024 10:19:13 EDT (-0400)
  Re: hemisphere  
From: Alain
Date: 15 Jun 2004 06:11:20
Message: <40cecb48$1@news.povray.org>
Hughes, B. nous apporta ses lumieres ainsi en ce 14/06/2004 21:20... :

>"FCB" <nomail@nomail> wrote in message
>news:web.40ce359f86b59361dc24a13d0@news.povray.org...
>  
>
>>is there a way to make a hemishere?
>>    
>>
>
>I'll answer with one complete simple solution, but if you're asking about
>something more than what's shown below feel free to ask more.
>
>/* BEGIN simple hemisphere */
>
>camera {location -4*z look_at 0}
>
>light_source {-100*z,1}
>
>#declare Hemisphere=
>intersection {
>  plane {-y,0} // could use x, instead of y, for East/West
> // negative y for northern hemisphere, positive for southern
>  sphere {0,1}
>  pigment {color rgb <1,1,1>}
>}
>
>object {Hemisphere
>  rotate < 15 , 0 , 0 > // to turn whichever way needed
>  translate -1.25*x} // put on left side
>
>/* and to hollow it out... */
>
>difference {
>  object {Hemisphere}
>  sphere {0,1 // cutaway object
>   pigment {color rgb <1,0,0>}
>   scale 0.9 // scale for thickness ( nearer 1 is thinner)
>   }
>  rotate < 15 , 0 , 0 > // to turn whichever way needed
>  translate 1.25*x // put on right side
>}
>
>/* END */
>
>
>  
>
I prefer to use a box instead of a plane like:
intersection{
    sphere{0,1}
    box{<0,1.1,1.1>,-1.1}
    pigment{MyPigment}
    scale MyScale
    }
If you want an empty hemisphere, try this:
difference{
    sphere{0,1}
    sphere{0,.9}// adjust for the thickness you want
    box{<0,-1.1,-1.1>,1.1}
    pigment{MyPigment}
    scale MyScale
    }

That way, the bounding is more efficient (tighter)

Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.